<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->

<title>putp</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_009_746">&nbsp;</a>NAME</h4><blockquote>
putp, tputs - output commands to the terminal
</blockquote><h4><a name = "tag_001_009_747">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="term.h.html">term.h</a>&gt;

int putp(const char *<i>str</i>);

int tputs(const char *<i>str</i>, int <i>affcnt</i>, int (*<i>putfunc</i>)(int));
</code>
</pre>
</blockquote><h4><a name = "tag_001_009_748">&nbsp;</a>DESCRIPTION</h4><blockquote>
These functions output commands contained in the <b>terminfo</b> database
to the terminal.
<p>
The
<i>putp()</i>
function is equivalent to <i>tputs</i>(<i>str</i>, 1, <i>putchar</i>).
The output of
<i>putp()</i>
always goes to <b>stdout</b>, not to the <i>fildes</i> specified in
<i><a href="setupterm.html">setupterm()</a></i>.
<p>
The
<i><a href="tputs.html">tputs()</a></i>
function outputs <i>str</i> to the terminal.  The <i>str</i> argument must be
a <b>terminfo</b> string variable or the return value from
<i><a href="tgetstr.html">tgetstr()</a></i>,
<i><a href="tgoto.html">tgoto()</a></i>,
<i><a href="tigetstr.html">tigetstr()</a></i>
or
<i><a href="tparm.html">tparm()</a></i>.
The <i>affcnt</i> argument is the number of lines affected, or 1 if not
applicable.
If the <b>terminfo</b> database indicates that the terminal in use requires
padding after any command in the generated string,
<i><a href="tputs.html">tputs()</a></i>
inserts pad characters into the string that is sent to the
terminal, at positions indicated by the <b>terminfo</b> database.  The
<i><a href="tputs.html">tputs()</a></i>
function outputs each character of the generated string by calling the
user-supplied function
<i>putfunc</i>
(see below).
<p>
The user-supplied function
<i>putfunc</i>
(specified as an argument to
<i><a href="tputs.html">tputs()</a></i>)
is either
<i><a href="../xsh/putchar.html">putchar()</a></i>
or some other function with the same prototype.  The
<i><a href="tputs.html">tputs()</a></i>
function ignores the return value of
<i>putfunc</i>.
</blockquote><h4><a name = "tag_001_009_749">&nbsp;</a>RETURN VALUE</h4><blockquote>
Upon successful completion, these functions return OK.
Otherwise, they return ERR.
</blockquote><h4><a name = "tag_001_009_750">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_001_009_751">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
Changing the terminal attributes using these 
functions may cause the renditions of characters
within a curses window to be altered on some 
terminals. 
<p>
After use of any of these functions, the model Curses
maintains of the state of the terminal might not match the actual state of the
terminal.  The application should touch and refresh the window before resuming
conventional use of Curses.
<p>
</blockquote><h4><a name = "tag_001_009_752">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="doupdate.html">doupdate()</a></i>,
<i><a href="is_linetouched.html">is_linetouched()</a></i>,
<i><a href="../xsh/putchar.html">putchar()</a></i>
(in the <b>XSH</b> specification),
<i><a href="tgetent.html">tgetent()</a></i>,
<i><a href="tigetflag.html">tigetflag()</a></i>,
<i><a href="term.h.html">&lt;term.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
